<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>折线图</title>
		<script type="text/javascript" src="js/echarts.js"></script>
	</head>
	<body>
		<div id="sales" style="width: 600px;height: 400px;">
		</div>
		<script>
			myCharts=echarts.init(document.getElementById("sales"));
		    var option={
				title:{
					text:'一周销量变化曲线',
					subtext:'2022年第20周',
					left:'center'
				},
				xAxis:{
					type:'category',
					data:['周一','周二','周三','周四','周五']
				},
				yAxis:{
					type:'value',
					},
					legend:{
						data:['鼠标销量','水杯销量'],
						left:'right'
					},
					series:[
						{
							name:'鼠标销量',
							data:[200,350,500,180,700],
							type:'line'
						},
						{
							name:'水杯销量',
							data:[100,250,450,120,600],
							type:'line'
						}
					]
				};
		myCharts.setOption(option);	
		</script>
	</body>
</html>
